package cc.rengu.redp.flowable.domain;

import lombok.Data;

import java.util.List;

/**
 * 分支限定规则属性配置
 */
@Data
public class CustomSequenceFlow {

    /**
     * 流入决定流出
     */
    private List<IncomingDecideOutgoings> incomingDecideOutgoings;

    /**
     * 分支显示规则
     */
    private DisplayRule displayRule;

    /**
     * 分支验证规则
     */
    private SelectRule selectRule;

    /**
     * 流入决定流出（在流入分支上配置）
     */
    @Data
    public class IncomingDecideOutgoings {
        private String sequenceFlowId; //当前分支指向节点的流出分支ID
        private String key;
    }

    @Data
    public class DisplayRule {
        private String aviatorExpression;
    }

    @Data
    public class SelectRule {
        public final static String TYPE_AVIATOR = "1";
        public final static String TYPE_PLUGINS = "2";

        private String type;
        private String aviatorExpression;
        private List<String> ctRules;
    }
}
